Sun = {}
Sun.new = function(x, y)
	local self = {}
	local x = x or 0
	local y = y or 0
	local image = love.graphics.newImage( "img/particle.png" )
	local ps = love.graphics.newParticleSystem( image, 100 )
	local interval = 0
	
	self.getX = function() return round(x) end
	self.getY = function() return round(y) end
	
	self.setX = function(val) x = val end
	self.setY = function(val) y = val end
	
	ps:setBufferSize(150)
	ps:setColors(0,52,255,26,255,0,0,0)
	ps:setDirection(6.2831852)
	ps:setEmissionRate(150)
	ps:setGravity(0, 0)
	ps:setLifetime(-1)
	ps:setParticleLife(0.5,1)
	ps:setRadialAcceleration(-2000,-2000)
	ps:setRotation(0,0)
	ps:setSizes(3,3,1)
	ps:setSpeed(100, 200)
	ps:setSpin(0,0)
	ps:setSpread(6.2831852)
	
	function self:update(dt)
		ps:update(dt)
	end
	
	function self:draw()
		love.graphics.setColorMode("modulate")
		love.graphics.setBlendMode("additive")
		love.graphics.draw(ps, x, y)
		love.graphics.setBlendMode("alpha")
	end
	
	setmetatable(self, Sun)
	return self
end